package com.powervision.mvvmdemo.ui.repository

import com.powervision.http.base.BaseRepository
import com.powervision.http.entity.ApiResponse
import com.powervision.mvvmdemo.ui.http.RetrofitClient
import com.powervision.mvvmdemo.ui.model.UserModel

/**
 * @auth: njb
 * @date: 2021/12/13 15:26
 * @desc: 描述
 */
class RegisterRepository :BaseRepository(){
    private val mRegisterService by lazy {
        RetrofitClient.service
    }

    suspend fun register(username:String,password:String,repassword:String): ApiResponse<UserModel?> {
        return executeHttp {
            mRegisterService.register(username, password,repassword)
        }
    }
}